<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;


class TeamCashApply extends Model
{
    protected  $table='team_cash_apply';

    protected function getScopeAttributes()
    {
        return [ 'org_id' ];
    }

    protected $fillable = [
        'org_id',
        'team_id',
        'order_count',
        'amount',
        'service_fee',
        'transfer_fee',
        'apply_msg',
        'remark',
        'recive_info',
        'verify_status',
        'verify_msg',
    ];

    protected $casts = [
        'recive_info'=>'array'
    ];


    public function org() {
        return $this->belongsTo('App\Models\Org', 'org_id', 'id');
    }

    public function team() {
        return $this->belongsTo('App\Models\Team', 'team_id', 'id');
    }

}
